1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular to a computer implemented method and apparatus for transferring data between devices. Still more particularly, the present invention relates to a computer implemented method, apparatus, and program usable program code for preventing network outages caused by exchanges of acknowledgement.
2. Description of the Related Art
The Internet is a global network of computers and networks joined together by means of gateways that handle data transfer and the conversion of messages from a protocol of the sending network to a protocol used by the receiving network. On the Internet, any computer may communicate with any other computer with information traveling over the Internet through a variety of languages, also referred to as protocols. The set of protocols used on the Internet is called transmission control protocol/Internet Protocol (TCP/IP).
The Internet has revolutionized both communications and commerce, as well as being a source of both information and entertainment. For many users, email is a widely used format to communicate over the Internet. Additionally, the Internet is also used for real-time voice conversations.
With respect to transferring data over the Internet, the World Wide Web environment is used. This environment is also referred to simply as “the Web”. The Web is a mechanism used to access information over the Internet. In the Web environment, servers and clients generate data transactions using the hypertext transfer protocol (HTTP), a known protocol for handling the transfer of various data files, such as text files, graphic images, animation files, audio files, and video files.
In transferring data, transmission control protocol is used to ensure that data arrives accurately and is one hundred percent intact on the receiving end. Transmission control protocol is a connection or protocol. In a transmission control protocol connection, two ends of the connection send data and acknowledge the receipt of data. In sending and receiving data, each packet contains a sequence number and an acknowledgement number. With a transmission control protocol connection, every octet of data sent over this type of connection has a sequence number. The sequence number indicates that all of the octets up to, but not including, the octet identified by the sequence number have been received.
With handling data over a transmission control protocol connection, determinations such as whether the acknowledgement refers to sequence numbers sent but not yet acknowledged are made along with identifying all sequence numbers occupied by segments that have been acknowledged to remove the segment from a retransmission queue. Further, a determination is made as to whether an incoming segment contains sequence numbers, which are expected. Each segment or packet also carries an acknowledgement number. This number is the sequence number of the next expected data octet of transmission.
With this type of mechanism for ensuring reception of data, two ends of a transmission control protocol connection may sometimes enter a “desynchronized” state. With this type of state, both ends of the connection may send acknowledgement packets back and forth over and over, causing an “ACK storm”. With this type of exchange of packets, these two end points of the transmission control protocol connection are flooded with acknowledgement packets.
In particular, once one end of a connection enters a desynchronized state, the acknowledgement returned is not accepted because the acknowledgement packet acknowledges data that the end point has not sent. For example, with two end points, end point A and end point B, in a synchronized state, end point A expects sequence number X and has sent Y bytes so far. End point B has a next expected sequence number of Y with X bytes having been sent so far. When a desynchronized state is present, end point A has a next expected sequence number of X and sent so far Y bytes. End point B has a next expected sequence number of Y+Z and has sent so far bytes being X. In this case, end point B expects a sequence number that is Z more bytes than end point A has sent so far in the connection. With this desynchronized state, an acknowledgement sent from B contains a sequence number X and an acknowledgement of Y+Z.
Consequently, end point A will not accept this acknowledgement packet because this packet acknowledges data that end point A has not yet sent. In other words, the acknowledgement packet from B says that end point B has received Y+Z bytes of data so far. In this case, however, end point A has only sent Y bytes of data.
With the protocols for handling transmission control protocol connections, end point A drops the packet after sending an acknowledgement to end point B. This acknowledgement packet includes a sequence number Y and an acknowledgement of X. The sequence number Y indicates that the next expected sequence is Y and that end point A has so far received X bytes. In a similar fashion, end point B drops this acknowledgement packet because the sequence number Y is an old sequence number, which is less than the expected sequence number of Y+Z. With this situation, end point B drops the packet and returns an acknowledgement that contains a sequence number X and acknowledgement Y+Z indicating that it has received Y+Z. As a result, a loop occurs with both ends generating acknowledgements in response to each other's acknowledgements. Traffic is generated without any exchange of data in this situation.
This type of loop or “ACK storm” may be caused by different situations. One situation involves network appliances that may rewrite sequence numbers. The rewriting of sequence numbers results in an incorrect acknowledgement being sent back to an end point. Additionally, in some cases, network interface cards may provide offload functionalities, such as transmission control protocol segmentation offloads. Network adapters that support large sent read-write transmission control protocol sequence numbers and the size of the payload may cause this type of loop. Further, a malicious user may deliberately try to desynchronize transmission control protocol end points to generate this type of loop and to cause the end points to crash or slowdown the network.